import Vue from 'vue';
import VueRouter from 'vue-router';
import Page1 from '../components/Page1.vue';
import Page2 from '../components/Page2.vue';
import Page3 from '../components/Page3.vue';
import Page4 from '../components/Page4.vue';
import Page5 from '../components/Page5.vue';
import Page6 from '../components/Page6.vue';
import Page7 from '../components/Page7.vue';

Vue.use(VueRouter);

const routes = [
  { path: '/page1', component: Page1 },
  { path: '/page2', component: Page2 },
  { path: '/page3', component: Page3 },
  { path: '/page4', component: Page4 },
  { path: '/page5', component: Page5 },
  { path: '/page6', component: Page6 },
  { path: '/page7', component: Page7 },
  { path: '/', redirect: '/page1' } // 默认重定向到Page1
];

const router = new VueRouter({
  routes
});

export default router;